package cn.iocoder.yudao.module.trade.service.order;

import cn.iocoder.yudao.module.trade.api.tradedelivery.dto.TradeOrderDeliveryDTO;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDeliveryDO;
import cn.iocoder.yudao.module.trade.enums.delivery.DeliveryTypeEnum;

import java.util.List;

/**
 * 订单配送信息(TradeOrderDelivery)表服务接口
 *
 * @author makejava
 * @since 2025-03-22 07:17:49
 */
public interface TradeOrderDeliveryService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    TradeOrderDeliveryDO queryById(Long id);


    /**
     * 新增数据
     *
     * @param tradeOrderDeliveryDO 实例对象
     * @return 实例对象
     */
    TradeOrderDeliveryDO insert(TradeOrderDeliveryDO tradeOrderDeliveryDO);

    /**
     * 修改数据
     *
     * @param tradeOrderDeliveryDO 实例对象
     * @return 实例对象
     */
    TradeOrderDeliveryDO update(TradeOrderDeliveryDO tradeOrderDeliveryDO);


    List<TradeOrderDeliveryDO> queryByOrderNo(String orderNo);

    TradeOrderDeliveryDO queryByOrderNoAndType(String orderNo, DeliveryTypeEnum deliveryTypeEnum);

    void createPickUpDelivery(Long userId, Long id, Integer deliveryType, Long pickUpStoreId, Long addressId, Long pickupInfoId);

    TradeOrderDeliveryDTO queryByWithdrawId(Long id);
}
